<%@ Page Language="C#" AutoEventWireup="true" CodeFile="VisitorAdd.aspx.cs" Inherits="Purchase_VisitorAdd" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>免费发布求购信息</title>
<link rel="Stylesheet" href="../Css/System/General.css" type="text/css" />
<link rel="Stylesheet" href="../Css/2009/message.css" type="text/css" />

<script language="javascript" type="text/javascript" src="../js/jquery-cn.js"></script>

<script language="javascript" type="text/javascript" src="../js/Common.js"></script>

</head>
<body>
    <form id="form9" runat="server">
        <asp:Label ID="dl" Text="WS_登录头部" runat="server"></asp:Label>
        <div id="main">
            <div class="pur_table_bg">
                免费发布求购信息</div>
            <table width="780" border="0" align="center" cellpadding="0" cellspacing="0" class="pur_table">
                <tr>
                    <th class="thbg">
                        填写联系方式</th>
                    <th colspan="2">
                        <span class="span_r"><font color="red">*</font>为必填</span>请务必填写准确的联系信息！（否则客户无法联系到您，信息不能被审核通过。）</th>
                </tr>
                <tr>
                    <td width="16%" class="left2">
                        <strong>联系人：</strong><font class="red"> *</font></td>
                    <td>
                        <asp:TextBox ID="txtLinkName" runat="server" Width="121px" align="left"></asp:TextBox>
                    </td>
                    <td>
                        <div id="lbl_txtLinkName">
                        </div>
                    </td>
                </tr>
                <tr>
                    <td class="left2">
                        <strong>公司名称：</strong><font class="red"> *</font></td>
                    <td>
                        <asp:TextBox ID="txtCompanyName" runat="server" Width="200px"></asp:TextBox></td>
                    <td>
                        <div id="lbl_txtDepartment">
                        </div>
                    </td>
                </tr>
                <tr>
                    <td class="left2">
                        <strong>电子邮件：</strong><font class="red"> *</font></td>
                    <td>
                        <asp:TextBox ID="txtEmail" runat="server" Width="200px"></asp:TextBox>
                    </td>
                    <td>
                        <div id="lbl_txtPosition">
                        </div>
                    </td>
                </tr>
                <tr>
                    <td class="left2" style="height: 26px">
                        <strong>固定电话：</strong><font class="red"> *</font></td>
                    <td style="height: 26px; width: 215px;">
                        <asp:TextBox ID="txtTel_International" runat="server" Width="20px" Text="86" MaxLength="2"></asp:TextBox>
                        <asp:TextBox ID="txtTel_DistrictNumber" runat="server" Width="30px" MaxLength="5"></asp:TextBox>
                        <asp:TextBox ID="txtTel_Telephone" runat="server" Width="70px" MaxLength="8"></asp:TextBox>
                        <asp:TextBox ID="txtTel_Ext" runat="server" Width="50px"></asp:TextBox>
                    </td>
                    <td style="height: 26px">
                        <div id="lbl_txtTel_1234">
                        </div>
                    </td>
                </tr>
                <tr>
                    <td class="left2">
                        <strong>手机：</strong><font class="red"> *</font></td>
                    <td>
                        <asp:TextBox ID="txtMobilePhone" runat="server" Width="200px" MaxLength="22"></asp:TextBox>
                    </td>
                    <td>
                        <div id="lbl_txtMobilePhone">
                        </div>
                    </td>
                </tr>
                <tr id="trCode" runat="server">
                    <td class="left2">
                        <strong>验证码：</strong><font class="red"> *</font></td>
                    <td style="width: 215px; height: 22px">
                        <asp:TextBox ID="yanzheng" runat="server" Width="72px" MaxLength="7"></asp:TextBox>
                        <img id="imgVerify" src="../login/CheckCode.aspx?" alt="看不清？点击更换" onclick="this.src=this.src+'?'" />
                    </td>
                    <td id="lbl_yangzheng">
                    </td>
                </tr>
                <tr runat="server">
                    <td colspan="3" class="purtent">
                        <asp:Button ID="btnSave" runat="server" Text="下一步" Width="70px" Height="22px" OnClientClick="javascript: return checkinfo()"
                            OnClick="btnSave_Click" />

                        <script language="JavaScript" src="../js/area.js" type="text/javascript"></script>

                    </td>
                </tr>
            </table>
        </div>
		<div id="font" class="f_n main960">
            <asp:Label ID="bt" Text="WS_网站底部" runat="server"></asp:Label>
    </div>
    </form>
    
		<script language="javascript">
var txtdiv = new Array("lbl_txtLinkName","lbl_txtDepartment","lbl_txtPosition","lbl_txtTel_1234","lbl_txtMobilePhone");
var txt = new Array(6);
txt[0]="<img src="+rightIcon+" width=\"19\" height=\"16\" align=\"absmiddle\"> <font color=#FF0000>联系人不能为空</font>";
txt[1]="<img src="+rightIcon+" width=\"19\" height=\"16\" align=\"absmiddle\"> <font color=#FF0000>公司名称不能为空</font>";
txt[2]="<img src="+rightIcon+" width=\"19\" height=\"16\" align=\"absmiddle\"> <font color=#FF0000>电子邮箱不能为空</font>";
txt[3]="<img src="+rightIcon+" width=\"19\" height=\"16\" align=\"absmiddle\"> <font color=#FF0000>固定电话不能为空</font>";
txt[4]="<img src="+rightIcon+" width=\"19\" height=\"16\" align=\"absmiddle\"> <font color=#FF0000>手机不能为空</font>";
txt[5]="<img src="+rightIcon+" width=\"19\" height=\"16\" align=\"absmiddle\"> <font color=#FF0000>输入不符合规范,请输入数字!</font>";
        function $(id){
            return document.getElementById(id);
        }
 function checkinfo(){
    var flog="";
    if( $("txtLinkName").value=="") {
            $("lbl_txtLinkName").innerHTML=txt[0];
           flog="0"; 
    } else{
            $("lbl_txtLinkName").innerHTML="";
    }  
    if($("txtCompanyName").value=="") {
            $("lbl_txtDepartment").innerHTML=txt[1];
            flog="0";  
    }else{
            $("lbl_txtDepartment").innerHTML="";
    }
    
    if($("txtEmail").value==""){
            $("lbl_txtPosition").innerHTML=txt[2];
            flog="0";  
   } else if(!ValidateEmail($("txtEmail").value)){
            $("lbl_txtPosition").innerHTML=txt[5];
            flog="0";  
   }else{
            $("lbl_txtPosition").innerHTML="";
    }
   
    if($("txtTel_International").value=="" || $("txtTel_DistrictNumber").value==""|| $("txtTel_Telephone").value=="") {
             $("lbl_txtTel_1234").innerHTML=txt[3];
            flog="0"; 
    } else if(!isNumber($("txtTel_International").value) || !isNumber($("txtTel_DistrictNumber").value) || !isNumber($("txtTel_Telephone").value)){
             $("lbl_txtTel_1234").innerHTML=txt[5];
            flog="0"; 
    } else{
            $("lbl_txtTel_1234").innerHTML="";
    }
   
    if($("txtMobilePhone").value=="") {
            $("lbl_txtMobilePhone").innerHTML=txt[4];
            flog="0";  
    }else if(!checkMobile($("txtMobilePhone").value)) {
             $("lbl_txtMobilePhone").innerHTML=txt[5];
            flog="0";  
    } else{
            $("lbl_txtMobilePhone").innerHTML="";
    }
    if(flog=="0"){
           return false;
          
    } else { 
           return true; 
          
    }        
}  
</script>
</body>
</html>
